package top.magicpotato.fast.quartz.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author ycl
 */
@ConfigurationProperties(prefix = "spring.quartz")
public class QuartzProperties {

    private String instanceName = "QuartzScheduler";

    /**
     * 实例 id
     */
    private String instanceId = "AUTO";

    private String threadCount = "5";

    private String isClustered = "false";

    private String clusterCheckinInterval = "15000";

    private String misfireThreshold = "60000";

    private String jobStoreClass = "org.quartz.impl.jdbcjobstore.JobStoreTX";

    private String driverDelegateClass = "org.quartz.impl.jdbcjobstore.StdJDBCDelegate";

    /**
     * 标志指示JDBCJobStore，JobDataMaps中的所有值都将是“字符串”，
     * 因此可以将其存储为名称 - 值对，而不是以BLOB列的序列化形式存储更复杂的对象。
     * 这可以方便，因为您避免了将非String类序列化为BLOB时可能产生的类版本控制问题。
     */
    private String useProperties = "true";

    private String dataSource = "quartzDataSource";

    private String tablePrefix = "QRTZ_";

    private String connectionProvider = "top.magicpotato.fast.quartz.connection.provider.StdConnectionProvider";

    public String getInstanceName() {
        return instanceName;
    }

    public void setInstanceName(String instanceName) {
        this.instanceName = instanceName;
    }

    public String getInstanceId() {
        return instanceId;
    }

    public void setInstanceId(String instanceId) {
        this.instanceId = instanceId;
    }

    public String getThreadCount() {
        return threadCount;
    }

    public void setThreadCount(String threadCount) {
        this.threadCount = threadCount;
    }

    public String getIsClustered() {
        return isClustered;
    }

    public void setIsClustered(String isClustered) {
        this.isClustered = isClustered;
    }

    public String getClusterCheckinInterval() {
        return clusterCheckinInterval;
    }

    public void setClusterCheckinInterval(String clusterCheckinInterval) {
        this.clusterCheckinInterval = clusterCheckinInterval;
    }

    public String getJobStoreClass() {
        return jobStoreClass;
    }

    public void setJobStoreClass(String jobStoreClass) {
        this.jobStoreClass = jobStoreClass;
    }

    public String getDriverDelegateClass() {
        return driverDelegateClass;
    }

    public void setDriverDelegateClass(String driverDelegateClass) {
        this.driverDelegateClass = driverDelegateClass;
    }

    public String getUseProperties() {
        return useProperties;
    }

    public void setUseProperties(String useProperties) {
        this.useProperties = useProperties;
    }

    public String getDataSource() {
        return dataSource;
    }

    public void setDataSource(String dataSource) {
        this.dataSource = dataSource;
    }

    public String getTablePrefix() {
        return tablePrefix;
    }

    public void setTablePrefix(String tablePrefix) {
        this.tablePrefix = tablePrefix;
    }

    public String getConnectionProvider() {
        return connectionProvider;
    }

    public void setConnectionProvider(String connectionProvider) {
        this.connectionProvider = connectionProvider;
    }

    public String getMisfireThreshold() {
        return misfireThreshold;
    }

    public void setMisfireThreshold(String misfireThreshold) {
        this.misfireThreshold = misfireThreshold;
    }
}
